Skip to content

Conversation

@DMwangnima
Copy link
Contributor

@DMwangnima DMwangnima commented Nov 3, 2025

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
Users often do not proactively set 404/405 handlers via engine.NoRoute and engine.NoMethod, resulting in monitoring/logging being unable to obtain valid handler information through RequestContext.HandlerName.
Adding default NoRoute and NoMethod handlers provides valid handler information, enabling more effective troubleshooting.
zh(optional):
用户往往不会主动通过 engine.NoRoute 和 engine.NoMethod 设置 404/405 的 Handler,导致监控/打点通过 RequestContext.HandlerName 无法获取到有效的 Handler 信息。
添加默认的 NoRoute 和 NoMethod Handler 来提供有效的 Handler 信息,从而更好地排查问题。

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

@DMwangnima DMwangnima requested review from a team as code owners November 3, 2025 03:20
@DMwangnima DMwangnima changed the title optimize: add default NoRoute and NoMethod handles to assist troubleshooting optimize: add default NoRoute and NoMethod handlers to assist troubleshooting Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.36%. Comparing base (4c46f50) to head (6112909).

Files with missing lines Patch % Lines
pkg/route/engine.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
- Coverage   86.38%   86.36%   -0.02%     
==========================================
  Files         149      149              
  Lines       14429    14437       +8     
==========================================
+ Hits        12464    12469       +5     
- Misses       1427     1429       +2     
- Partials      538      539       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AsterDY AsterDY changed the base branch from develop to main January 26, 2026 05:18
@DMwangnima DMwangnima changed the title optimize: add default NoRoute and NoMethod handlers to assist troubleshooting [WIP] optimize: add default NoRoute and NoMethod handlers to assist troubleshooting Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants